import type { RouteRecordRaw } from 'vue-router';

// admin 布局
const Layout = () => import('@/layout/index.vue');
// 页面权限
const SystemRole = () => import('@/views/system/role/index.vue');
// 按钮权限
const SystemUser = () => import('@/views/system/user/index.vue');

const routes: RouteRecordRaw = {
	path: '/system',
	name: 'systemLayout',
	redirect: '/system/role',
	component: Layout,
	meta: {
		title: 'router.system',
		icon: 'quanxian',
		index: '/system',
	},
	children: [
		{
			path: '/system/role',
			name: 'systemRoleRouter',
			component: SystemRole,
			meta: {
				title: 'router.systemRole',
				icon: 'yemian',
				index: '/system/role',
			},
		},
		{
			path: '/system/user',
			name: 'systemUserRouter',
			component: SystemUser,
			meta: {
				title: 'router.systemUser',
				icon: 'yonghu',
				index: '/system/user',
			},
		},
	],
};

export default routes;
